package com.shtel.paas.monitorcenter.view.dispaly.oracle.monitor.controller;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.shtel.paas.monitorcenter.util.Page;
import com.shtel.paas.monitorcenter.view.dispaly.oracle.monitor.entity.OracleMonitorDto;
import com.shtel.paas.monitorcenter.view.dispaly.oracle.monitor.service.OracleMonitorService;

/**
 * @Description:
 * @author zhangyy
 * @date 2018年6月5日
 */
// @EnablePaasMybatis
@MapperScan("com.shtel.paas.monitorcenter.view.dispaly.oracle.monitor.mapper")
@RestController
public class OracleMonitorController {

	@Autowired
	OracleMonitorService oracleMonitorService;

	// oracle监控分页查询
	@GetMapping("/selectOracleMonitorInfo")
	public Page<OracleMonitorDto> selectDistributeaddDatabaseMonitorInfo(
			@RequestParam("page") Integer page,
			@RequestParam("size") Integer pageSize,
			@RequestParam("hostName") String hostName,
			@RequestParam("systemName") String systemName) {
		OracleMonitorDto parameter = new OracleMonitorDto();
		parameter.setPage(page);
		parameter.setSize(pageSize);
		parameter.setHostName(hostName);
		parameter.setSystemName(systemName);
		Page<OracleMonitorDto> result = oracleMonitorService
				.selectOracleMonitorInfo(parameter);
		return result;
	}
}
